﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Test1
{
    class Rectangle : Shape
    {
        private double width;
        private double height;
        public Rectangle(double width, double height)
        {
            this.width = width;
            this.height = height;
        }
        public double getArea()
        {
            return width * height;
        }
        public bool judgeLegal()
        {
            if (width > 0 && height > 0)
            {
                return true;
            }
            else
            {
                return false;
            }
        }
    }
}
